package com.newcoder.service;


import com.newcoder.entity.LoginTicket;
import com.newcoder.entity.User;
import com.newcoder.util.ResponseWrapper;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yjh
 * @since 2024-12-04 10:03:26
 */
public interface UserService{

    ResponseWrapper insertUser(User user);

    ResponseWrapper deleteUserById(Integer id);

    ResponseWrapper updateUserById(User user);

    ResponseWrapper updateHeader(Integer id, MultipartFile headerImage);

    ResponseWrapper getUserById(Integer id);

    ResponseWrapper getUserByName(String username);

    ResponseWrapper selectUserPage(Integer status, Integer type, Integer offset, Integer limit);

    //LoginService
    // 登录
    ResponseWrapper login(boolean rememberme, User users);

    public LoginTicket findLoginTicket(String ticket);

    //生成登录验证码
    void kaptcha(HttpServletResponse response);

    // 退出登录
    ResponseWrapper logout(String ticket);

    // 注册
    ResponseWrapper register(User user);

    // 激活
    ResponseWrapper activation(String username, String activationCode);
}
